ComponentOne FlexReport for WinForms
Step 4 of 4: Rendering the Report
FlexReport Quick Start > Step 4 of 4: Rendering the Report

Once the report definition has been created, a data source defined and loaded into the C1FlexReport component, you can render the report to the printer, to the preview control - C1FlexViewer, or export to different file formats.

To preview the report in the FlexViewer control, the steps are as follows:

  1. From the Toolbox, double-click the C1FlexViewer control to add it to your project.
  2. From the Properties window, set the C1FlexViewer.Dock property to Fill.
  3. Select the Windows Form with your mouse and drag the corners to resize it.
  4. Double-click the form and enter the following code in the Form1_Load event handler:
'load report definition
c1FlexReport1.Load("..\..\Products Report.flxr", "Products Report")
'preview the report
c1FlexViewer1.DocumentSource = c1FlexReport1
//load report definition
c1FlexReport1.Load(@"..\..\Products Report.flxr", "Products Report");
//preview the report
c1FlexViewer1.DocumentSource = c1FlexReport1;